package Utility;

public class MakeDir
{

	public boolean makedirectory(String folderPath)
	{
		boolean bool=false;
		System.out.println(folderPath);
		String filePath = folderPath;
        filePath = filePath.toString();    
        java.io.File   myFilePath   =   new   java.io.File(filePath);
        try
        {
        	if(myFilePath.isDirectory())
        	{
        		System.out.println("新建目录已经存在!");
        	}
        	else
        	{
        		myFilePath.mkdir();
        		bool=true;
                System.out.println("新建目录成功");
            }
        }
        catch(Exception   e)
        {
        	System.out.println("新建目录操作出错");
        	e.printStackTrace();
        }
        return bool;
    }
	
	public static void main(String[] args){
		MakeDir dir = new MakeDir();
		dir.makedirectory("c:/cyk.txt");
	}
}
